import { defineStore } from 'pinia'
import { ref } from 'vue';

export const useCounterStore=defineStore('user',()=>{
    var id:string =null;
	var picture = ref<string>()
	
	const setPic =(pic:string)=>{
		picture.value=pic;
	}
	
	const getPic =()=>{
		return picture.value;
	}
    
	const getId =()=>{
		return id;
	}
	const setId =(user_id : string)=>{
		id=user_id;
	}
    //外部可访问
    return{
        getId,setId,getPic,setPic
    }
})